from django import template
from django.template.base import Library
from django.template.defaulttags import url as default_url
from django.conf import settings

register = Library()

class UrlNode(template.Node):
    def __init__(self, node):
        self.node = node

    def render(self, context):
        return "%s%s" % (
            settings.LIVE_ENGINE_URL,
            self.node.render(context)
        )

def url(parser, token):
    return UrlNode(default_url(parser, token))

url = register.tag(url)